<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
    <meta equiv="X-UA-Compatible" content="chrome=1"> 
    <title>『同行网-数码频道』-<%= yield :title %></title>
    <link rel="shortcut icon" href="<%= image_path 'favicon.ico' %>" />
    <%= stylesheet_link_tag 'reset','960_24_col','text','application' %>
    <%= stylesheet_link_tag 'jquery-ui-1.8.10.custom' %>
    <%#= stylesheet_link_tag 'demo' %>  
    <%= yield :css %>
    <%= javascript_include_tag 'jquery','jquery-ui','jquery_ujs','application' %>
    <%= javascript_include_tag 'autocomplete-rails','jquery.observe_field','jquery.scrollTo','jquery.timers-1.2','jquery.ui.datepicker-zh-CN' %>
    <%= yield :js %>
    <%= csrf_meta_tag %>
  </head>
  <body>
    <div id='body' class="container_24">
      <div id="top" class='grid_24'>
        <div class='grid_4 alpha'>                 
          <div id="logo"></div>
        </div>
        <div id='top_tools' class='grid_8 push_12 omega'>
          <%#= link_to "同行报价",root_url, :title => "同行报价" %>
          <%= link_to '报价同行', root_url, :title => '报价的同行单位' %>
          <%= link_to "我的报价",enterprise_peer_prices_url(:enterprise_id => current_enterprise), :title => "我的报价" %>
          <%#= link_to "产品库",products_url, :title => "我的报价" %>
          <% if has_logined? %>
          <%= link_to "关于我-#{current_user.full_name}",user_url(current_user), :title => "关于我-#{current_user.full_name}的基本资料", :target => :_blank %>
          <%= link_to "注销",session_url(:current), :method => :delete, :title => '退出登录状态' %>
          <% end %>
          <%= yield :help %>          
        </div>
        <div class='clear'></div>
      </div>
      <%= render :file => 'layouts/browser_update.html' if session[:close_browser_remind].nil? and accessed_by?(:browser_version => 'msie 6')  %>
      <%= yield %>
      <div class='clear'></div>
      <div class='grid_24'>        
        <div id="copy_right" class="grid_12 alpha">
          Copyright © 2010-2011 by <b>同行网</b> 
        </div>
        <div id="tongji" class='grid_1'>          
          <% if Rails.env.production? %> 
          <script type="text/javascript">
          var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
          document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F3c0b7aaf6a4cf8e6bccdeb7394b317a2' type='text/javascript'%3E%3C/script%3E"));
          </script>
          <% end %>
        </div>
      </div>
    </div>
  </body>
  <script type="text/javascript" charset="utf-8">
    function after_page_inited() {
      // 关闭ff的自动缓存,关闭input回车提交的功能
      $(':text,select').attr('autocomplete','off');
      // 不使用loading图片
      $('a:not(.no_loading)').bind('ajax:before',function() {
        $(this).replaceWith('<%= loading_image_tag %>');
      });
      // 关闭回车提交
      $(":text[class!='enter_to_submit']").keypress(function(event) {
        if(event.keyCode == 13) {
          return false;
        } 
      })
      // submit 增加disable_with
      $(":submit[id!='quick_search_order']").attr('data-disable-with','提交中...');
    }
    
    $(document).ready(function() {
      after_page_inited();
      $('a,form').ajaxComplete(function() {
        after_page_inited();
      });
    })
  </script>  
</html>
